<%--
  Created by IntelliJ IDEA.
  User: ss
  Date: 2021/12/14
  Time: 14:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script>
    $(function (){
        $("#uid").blur(function (){
            var uid = $(this).val();
            $.post("/getuser","uid="+uid,function (res){
                // 此时根据后台代码，res是json格式的user对象
                var obj  = eval("("+res+")");
                var up =obj.upass;
               // alert(up);
                var ph = obj.phone;
               // alert(ph);
                $("#upass").val(up);
                $("#phone").val(ph);

            })
        })
    })
</script>
<body>
uid:<input id="uid" type="text"></br>
upass:<input id="upass" type="password"></br>
phone:<input id="phone" type="text"></br>
</body>
</html>
